<template>
  <div class="home">
    <h1>微前端主应用</h1>
    <p>这是一个基于 qiankun 的微前端架构示例</p>
    <el-row :gutter="20">
      <el-col :span="12">
        <el-card>
          <template #header>
            <div class="card-header">
              <span>Vue2 子应用</span>
            </div>
          </template>
          <p>点击上方菜单或下方按钮访问 Vue2 子应用</p>
          <el-button type="primary" @click="$router.push('/mainvue2')">
            进入 Vue2 应用
          </el-button>
        </el-card>
      </el-col>
      <el-col :span="12">
        <el-card>
          <template #header>
            <div class="card-header">
              <span>Vue3 子应用</span>
            </div>
          </template>
          <p>点击上方菜单或下方按钮访问 Vue3 子应用</p>
          <el-button type="success" @click="$router.push('/mainvue3')">
            进入 Vue3 应用
          </el-button>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'Home'
}
</script>

<style scoped>
.home {
  padding: 20px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style> 